package dxunderground.winampController.Server;

import java.io.File;
import java.io.FileFilter;

public class MusicFilter implements FileFilter {
	public boolean accept(File file) {
		boolean value = false;
		String fileName = file.toString().toLowerCase();
		if (file.toString().endsWith(".cda") || fileName.endsWith(".flac") || fileName.endsWith(".mid") || fileName.endsWith(".midi") || fileName.endsWith(".rmi") || fileName.endsWith(".kar") || fileName.endsWith(".miz") || fileName.endsWith(".mod") || fileName.endsWith(".mdz") || fileName.endsWith(".nst") || fileName.endsWith(".stm") || fileName.endsWith(".stz") || fileName.endsWith(".s3m") || fileName.endsWith(".s3z") || fileName.endsWith(".it") || fileName.endsWith(".itz") || fileName.endsWith(".xm") || fileName.endsWith(".xmz") || fileName.endsWith(".mtm") || fileName.endsWith(".ult") || fileName.endsWith(".669") || fileName.endsWith(".far") || fileName.endsWith(".amf") || fileName.endsWith(".okt") || fileName.endsWith(".ptm") || fileName.endsWith(".mp3") || fileName.endsWith(".mp2") || fileName.endsWith(".mp1") || fileName.endsWith(".aac") || fileName.endsWith(".vlb") || fileName.endsWith(".m4a") || fileName.endsWith(".mp4") || fileName.endsWith(".nsa")
				|| fileName.endsWith(".ogg") || fileName.endsWith(".aiff") || fileName.endsWith(".au") || fileName.endsWith(".avr") || fileName.endsWith(".caf") || fileName.endsWith(".htk") || fileName.endsWith(".iff") || fileName.endsWith(".mat") || fileName.endsWith(".paf") || fileName.endsWith(".pvf") || fileName.endsWith(".raw") || fileName.endsWith(".sd2") || fileName.endsWith(".sds") || fileName.endsWith(".sf") || fileName.endsWith(".voc") || fileName.endsWith(".w64") || fileName.endsWith(".wav") || fileName.endsWith(".xi") || fileName.endsWith(".wma") || fileName.endsWith(".m3u") || fileName.endsWith(".m3u8") || fileName.endsWith(".pls") || fileName.endsWith(".b4s") || fileName.endsWith(".wpl") || fileName.endsWith(".asx") || file.isDirectory()) {
			value = true;
		}
		return value;
	}

}
